package org.mat.sample.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.mat.sample.entity.Order;
import org.mat.sample.enums.OrderStatus;

import java.util.List;

@Mapper
public interface OrderMapper {
    Order selectWithLock(String orderId);
    int updateStatus(@Param("orderId") String orderId,
                     @Param("status") OrderStatus status);
    List<Order> selectByCenterAndStatus(@Param("centerId") String centerId,
                                        @Param("status") OrderStatus status);
}